<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML>
<html>
<head>
    <title>Title</title>
    <meta charset="UTF-8">
    <link href="kindeditor-4.1.10/themes/default/default.css" type="text/css" rel="stylesheet">
    <%--必须放上面--%>
    <script type="text/javascript" src="jquery-1.10.2.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="kindeditor-4.1.10/kindeditor-all-min.js"></script>

</head>
<body>
<form action="test.html" method="post" id="form">
    <textarea id="test" name="content"></textarea>
    <input type="submit" value="提交">
    <input type="button" value="按钮" onclick="tijiao()">
</form>
<script type="text/javascript">
    var kingEditorParams = {
        filePostName: "file1",//指定上传文件参数名称
        uploadJson: 'upload.html',//指定上传文件请求的url。
        dir: "image"//上传类型，分别为image、flash、media、file
    }
var editor;
    $(function () {
        editor=   KindEditor.create($("#test"), kingEditorParams);
    })
    function tijiao(){
        editor.sync();//如果使用js提交表单，需要强制同步
        $('#form').submit();
    }
</script>
</body>
</html>
